//
//  TextModelCell.m
//  BobNews
//
//  Created by lanou3g on 16/5/11.
//  Copyright © 2016年 YJC. All rights reserved.
//

#import "TextModelCell.h"
#import "UIImageView+WebCache.h"
@interface TextModelCell ()
@property (weak, nonatomic) IBOutlet UILabel *contentLabel;
@property (weak, nonatomic) IBOutlet UIImageView *UserImageView;
@property (weak, nonatomic) IBOutlet UILabel *userNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UILabel *replyLable;

@end
@implementation TextModelCell

- (void)setModel:(TextModel *)model {
    if (_model != model) {
        _model = model;
    }
}
- (void)layoutSubviews {
    self.contentLabel.text = self.model.content;
    self.userNameLabel.text = self.model.userName;
    self.timeLabel.text = [NSString stringWithFormat:@"%@",self.model.cTime];
    self.replyLable.text = [NSString stringWithFormat:@"%@跟帖",self.model.discussCount];
    
    if (self.model.userHeadPicUrl) {
         [self.UserImageView sd_setImageWithURL:[NSURL URLWithString:self.model.userHeadPicUrl]];
    }
    self.UserImageView.image = [UIImage imageNamed:@"t2.gif"];
}
+ (CGFloat)height {
    return 150;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
